#define _CRT_SECURE_NO_WARNINGS 1
#include"SLlist.h"

void test1()
{
	SLl ss;
	SeqListInit(&ss);

	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);
	SeqListPushBack(&ss, 3);
	SeqListPushBack(&ss, 4);
	SeqListPushBack(&ss, 5);

	SeqListPrint(&ss);
	SeqListDestory(&ss);
}

void test2()
{
	SLl ss;
	SeqListInit(&ss);

	SeqListPushFront(&ss, 1);
	SeqListPushFront(&ss, 2);
	SeqListPushFront(&ss, 3);
	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);
	SeqListPushFront(&ss, 4);
	SeqListPushFront(&ss, 5);

	SeqListPrint(&ss);
	SeqListDestory(&ss);
}


void test3()
{
	SLl ss;
	SeqListInit(&ss);

	SeqListPushFront(&ss, 1);
	SeqListPushFront(&ss, 2);
	SeqListPushFront(&ss, 3);
	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);

	SeqListPopFront(&ss);
	SeqListPopFront(&ss);
	SeqListPopFront(&ss);
	SeqListPopFront(&ss);
	SeqListPopFront(&ss);
	SeqListPopFront(&ss);
	SeqListPopFront(&ss);

	SeqListPrint(&ss);
	SeqListDestory(&ss);
}


void test4()
{
	SLl ss;
	SeqListInit(&ss);

	SeqListPushFront(&ss, 1);
	SeqListPushFront(&ss, 2);
	SeqListPushFront(&ss, 3);
	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);

	SeqListPopBack(&ss);
	SeqListPopBack(&ss);
	SeqListPopBack(&ss);
	SeqListPopBack(&ss);
	SeqListPopBack(&ss);
	SeqListPopBack(&ss);
	SeqListPopBack(&ss);

	SeqListPrint(&ss);
	SeqListDestory(&ss);
}


void test5()
{
	SLl ss;
	SeqListInit(&ss);

	SeqListPushFront(&ss, 1);
	SeqListPushFront(&ss, 2);
	SeqListPushFront(&ss, 3);
	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);

	int tmp = SeqListFind(&ss, 3);
	printf("%d\n",tmp);
	//SeqListPrint(&ss);
	SeqListDestory(&ss);
}

void test6()
{
	SLl ss;
	SeqListInit(&ss);

	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);
	SeqListPushBack(&ss, 3);
	SeqListPushBack(&ss, 1);
	SeqListPushBack(&ss, 2);

	SeqListErase(&ss, 3);

	SeqListPrint(&ss);
	SeqListDestory(&ss);
}


int main()
{

	test6();
	return 0;
}